From 957d52e97f01cd49d04e0ec6d16124cc31015112 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Fri, 8 Sep 2017 17:21:37 +0200 Subject: [PATCH] @massimo: pretty please use git :) It would be really nice if others, and prolifix people like you, prepared git formatted patches, so that it is much saner and easier to push and work with contributions as a maintainer with a dirty tree, and in even more valuable bugs than this one.. without needing to re-read and re-understand the entire context of the fix, before fully reimplementing it. This commit fixes bug #787441, where NaN is polluting the computer error/tolerance. --- babl/babl-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babl/babl-util.c b/babl/babl-util.c index 01a5e97..7af1362 100644 --- a/babl/babl-util.c +++ b/babl/babl-util.c @@ -91,7 +91,7 @@ babl_rel_avg_error (const double *imgA, for (i = 0; i < samples; i++) error += fabs (imgA[i] - imgB[i]); - if (error >= 0.000001) + if (!(error < 0.000001)) error /= samples; else error = 0.0; -- 2.30.2